package jps;

/**
 * @Name: Util
 * @Description:
 * @Author: colfish
 * @Date: 2021/5/18 15:28
 * 好好学习，天天向上！
 */
public class Util {
    public static int octile(int dx, int dy) {
        return (int) (Math.max(dx, dy) + (Math.sqrt(2) - 1) * Math.min(dx, dy));
    }

    public static int heuristic(int dx, int dy) {
        return (int) Math.sqrt(dx * dx + dy * dy);
    }
}